﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Progetto.Beans;

namespace Progetto
{
    public partial class EventPreview : UserControl
    {
        private Label _label;
        private PictureBox _pictureBox;

        public EventPreview()
        {
            InitializeComponent();
        }

        public EventPreview(Event e) 
        {
            _label = new Label();
            _label.Text = e.Name;
            _label.Dock = DockStyle.Bottom;
            this.Controls.Add(_label);

            _pictureBox = new PictureBox();
            _pictureBox.ImageLocation = e.ImageURL;
            _pictureBox.Dock = DockStyle.Fill;
            this.Controls.Add(_pictureBox);
        }


    }
}
